<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8"/>
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
	<title>angular</title>
</head>
<body>
<div ng-app="myApp">
	<div ng-controller="myappCtrl">
		<input type="text" ng-model="search">
		<table border="1" width="100%" style="font-size: 16px;text-align: center;">
			<thead>
				<tr>
					<th>id</th>
					<th>name</th>
					<th>phone</th>
				</tr>
			</thead>
			<tbody>
				<tr ng-repeat="(key, value) in data">
					<td>{{value.id}}</td>
					<td>{{value.name}}</td>
					<td>{{value.phone|truncate:6}}</td>
				</tr>
			</tbody>
		</table>
	</div>
</div>

<script type="text/javascript">
	document.getElementsByTagName('html')[0].style.fontSize=window.screen.width/10+'px';
</script>
<script src="angular.min.js"></script>
<script src="angular-ui-router.js"></script>
<script type="text/javascript">
	var app =angular.module('myApp', []);
	app.filter('truncate',function() {
		return function(mobile,len){
			len=len?len:3;
			return mobile.substr(0,11-len)+new String('*').repeat(len)
		}
	});
	app.controller('myappCtrl', function ($scope,$filter) {
		$scope.data=[
			{id:32,name:'小兵1',phone:'13454567434'},
			{id:54,name:'小兵145',phone:'134543434634'},
			{id:23,name:'323小兵1',phone:'3453454567434'},
			{id:98,name:'小3454兵1',phone:'2234454567434'}			
		];
	})
</script>
</body>
</html>
<!--应该是14.11，时间-2017-05-08->